package com.example.tables.dao;

import com.example.tables.bean.TableABean;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TableADao {

    @Insert("insert into tablea(a,b,c,d,e,f,aa,bb,cc,dd,ee ) values (#{a},#{b},#{c},#{d},#{e},#{f},#{aa},#{bb},#{cc},#{dd},#{ee})")
    int addData(TableABean tableABean);

    @Update("update tablea set b = #{b}, c = #{c}, d = #{d}, e = #{e}, f = #{e}, aa = #{aa}, bb = #{bb}, cc = #{cc}, dd = #{dd}, ee = #{ee} where A = #{A} ")
    int update(@Param("a")String a,
               @Param("b")String b,
               @Param("c")String c,
               @Param("d")String d,
               @Param("e")String e,
               @Param("f")String f,
               @Param("aa")int aa,
               @Param("bb")int bb,
               @Param("cc")int cc,
               @Param("dd")int dd,
               @Param("ee")int ee);
    @Delete("delete from tablea where a = #{a}")
    int delete(@Param("a")String a);

    @Select("select * from tablea where a like #{a}")
    List<TableABean> getData(@Param("a")String a);




}
